home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
nivb
/
tts.frm
< prev
next >
Wrap
Text File
|
1995-05-07
|
2KB
|
74 lines
VERSION 2.00
Begin Form TTSForm
Caption = "TTS Services Test"
ClientHeight = 2280
ClientLeft = 2010
ClientTop = 1500
ClientWidth = 7320
Height = 2685
Left = 1950
LinkTopic = "Form1"
ScaleHeight = 2280
ScaleWidth = 7320
Top = 1155
Width = 7440
Begin ListBox ServerList
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Courier"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 1395
Left = 120
TabIndex = 1
Top = 120
Width = 7095
End
Begin CommandButton OKButton
Caption = "&OK"
Height = 375
Left = 3120
TabIndex = 0
Top = 1800
Width = 855
End
End
Sub OKButton_Click ()
Unload TTSForm
End Sub
Sub Form_Load ()
prefConnID% = GetPreferredConnectionID()
For connID% = 1 To 8
'for each connection in workstation's file server name table
'get the table entry, then see if it's null
serverName$ = String$(48, 0)
If (IsConnectionIDInUse(connID%) = 1) Then
GetFileServerName connID%, serverName$
serverName$ = Left$(serverName$, InStr(serverName$, Chr$(0)) - 1)
If (Len(serverName$) > 20) Then
serverName$ = Left$(serverName$, 20)
End If
SetPreferredConnectionID (connID%)
ttsAvail% = TTSIsAvailable()
If (ttsAvail% = 1) Then
ServerList.AddItem Str$(connID%) + " " + serverName$ + String$(22 - Len(serverName$), " ") + " TTS is available"
ElseIf (ttsAvail% = 253) Then
ServerList.AddItem Str$(connID%) + " " + serverName$ + String$(22 - Len(serverName$), " ") + " TTS is disabled"
Else
ServerList.AddItem Str$(connID%) + " " + serverName$ + String$(22 - Len(serverName$), " ") + " TTS is not available"
End If
End If
Next connID%
SetPreferredConnectionID (prefConnID%)
End Sub